# -*- coding: utf-8 -*-
# @Time    : 2020/5/14 15:01
# @Author  : suhong
# @File    : check_jss_page_num.py
# @Software: PyCharm

from fastapi import APIRouter

from app.core.return_info import ReturnInfo, SUCCESS
from app.sql_app.database import database
router = APIRouter()


# @router.get("/logs/hdfs/get_all")
# async def read_notes():
#     return_info = ReturnInfo()
#     query = check.select()
#     raws = await database.fetch_all(query)
#     return_info.status = SUCCESS
#     return_info.data = raws
#     return return_info.todict()

#
# @router.post("/jss_page_num/insert")
# async def create_note(c: Check):
#     return_info = ReturnInfo()
#     query = check.insert().values(key=c.key,
#                                   cid=c.cid,
#                                   pagenum=c.pagenum,
#                                   tiao=c.tiao,
#                                   title=c.title,
#                                   url=c.url,
#                                   create_time=c.create_time,
#                                   update_time=c.update_time,)
#     last_record_id = await database.execute(query)
#     return_info.status = SUCCESS
#     return_info.data =  {**c.dict(), "id": last_record_id}
#     return return_info.todict()

